package placemodel

type GppPlaceSettlementModel struct {
	GppPlaceSettlementDb
	CreateTime string `gorm:"column:create_time" json:"createTime"`
	UpdateTime string `gorm:"column:update_time" json:"updateTime"`
}

type GppPlaceSettlementDb struct {
	Id              int     `gorm:"column:id" json:"id"`
	PlaceId         int     `gorm:"column:place_id" json:"placeId"`
	OrderCount      int     `gorm:"column:order_count" json:"orderCount"`
	SettlementMoney int     `gorm:"column:settlement_money" json:"settlementMoney"`
	CostAmount      int     `gorm:"column:cost_amount" json:"costAmount"`
	Proportion      float64 `gorm:"column:proportion" json:"proportion"`
	Commission      float64 `gorm:"column:commission" json:"commission"`
	HotelId         string  `gorm:"column:hotel_id" json:"hotelId"`
	OriginalOrder   string  `gorm:"column:original_order" json:"originalOrder"`

	Status  uint8  `gorm:"column:status" json:"status"`
	Type    uint8  `gorm:"column:type" json:"type"`
	Month   string `gorm:"column:month" json:"month"`
	Message string `gorm:"column:message" json:"message"`
}

func NewPlaceGppModel() *PlaceModel {
	return &PlaceModel{}
}

func (m *GppPlaceSettlementDb) TableName() string {
	return "gpp_place_settlement"
}
